<?php

header("Content-type:text/html;charset=utf-8");

$name=$_POST["name"];


$conn = mysql_connect("localhost","root","root");
	
mysql_select_db("zrt");

$result = mysql_query("select * from yonghu where yhname = '$name'",$conn);
	
	if(mysql_num_rows($result) >0){
		//在ajax中,php是通过echo语句返回responseText
	
		echo 1;
	}else{
		echo 0;
	}
	
	mysql_close($conn);
	
?>